package com.bt.lms.ui.page.sys.style.action.btn;

import com.bt.lms.ui.page.sys.style.BtnStyle;
import javafx.event.EventHandler;
import javafx.scene.control.Button;
import javafx.scene.input.MouseEvent;

/**
 * 保存按钮的鼠标移出事件
 */
public class SaveBtnExitedAction implements EventHandler<MouseEvent> {

    /**
     * 按钮
     */
    private final Button saveBtn;

    /**
     * 构造事件
     * @param saveBtn 保存按钮
     */
    public SaveBtnExitedAction(Button saveBtn) {
        this.saveBtn = saveBtn;
    }

    /**
     * 事件实现
     * @param event the event which occurred
     */
    @Override
    public void handle(MouseEvent event) {
        BtnStyle.saveBtn(saveBtn);
    }
}
